package com.zzyl.mapper;

import com.zzyl.dto.ReservationDto;
import com.zzyl.vo.ReservationCountVo;
import com.zzyl.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReservationMapper {

    List<ReservationVo> findReservationsByPage(String status);

    ReservationVo findReservationById(Long id);

    void insertReservation(ReservationDto reservation);

    void updateReservation(ReservationDto reservation);

    void updateReservationById(Long id);


    Long getCancelledCount(Long userId, LocalDateTime begin, LocalDateTime end);

    List<ReservationCountVo> countByTime(LocalDateTime start, LocalDateTime end);

    void overdueReservation(LocalDateTime time);
}
